package database.access.layer;

import org.apache.mahout.cf.taste.impl.model.jdbc.MySQLJDBCDataModel;
import org.apache.mahout.cf.taste.model.JDBCDataModel;

import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;

public class RecommenderDal {
	private MysqlDataSource dataSource = null;
	private JDBCDataModel dataModel = null;
	
	public RecommenderDal(){
		this.dataSource = new MysqlDataSource ();
		this.dataSource.setServerName("localhost");
		this.dataSource.setUser("John");
		this.dataSource.setPassword("John5555");
		this.dataSource.setDatabaseName("john");
		this.dataModel = new MySQLJDBCDataModel(
		dataSource, "PREFERENCE", "USERID",
		"MOVIEID", "VALUE", null);
	}

	public JDBCDataModel getDataModel() {
		return dataModel;
	}

	public void setDataModel(JDBCDataModel dataModel) {
		this.dataModel = dataModel;
	}

}
